#!/bin/bash

apt-get update
apt-get -y install tk-dev
apt-get -y install python3-tk
apt-get -y install libbz2-dev
apt-get	-y install gcc
apt-get -y install make
apt-get	-y install docker.io
apt-get	-y install docker-compose
apt-get	-y install ntpdate

docker load -i /collect_slave/resource/monitor/redis.tar
docker load -i /collect_slave/resource/monitor/prometheus.tar
docker load -i /collect_slave/resource/monitor/node_exporter.tar
docker load -i /collect_slave/resource/monitor/cadvisor.tar

cd /collector_slave/resource || exit
tar -xvf Python-3.6.8.tgz
cd /collector_slave/resource/Python-3.6.8 || exit
./configure --enable-optimizations --prefix=/usr/local/bin/python3.6
make
make install
ln -s -f /usr/local/bin/python3.6/bin/python3.6 /usr/bin/python3.6
ln -s -f /usr/local/bin/python3.6/bin/pip3.6 /usr/bin/pip3.6

pip3.6 install --upgrade pip
pip3.6 install kafka
pip3.6 install requests
pip3.6 install scp
pip3.6 install torch
pip3.6 install pandas
pip3.6 install redis
pip3.6 install kubernetes